<template>
  <div>
    <van-nav-bar fixed title="提现记录" left-arrow @click-left="$utils.back($route.path);" />
    <div class="has-top">
      <div class="head-bg-box bg-primary"></div>
      <div class="page-content-box mlr-25">
        <div class="total-box mt-30 bg-white flex-s-c plr-40 br-13">
          <div>
            <p class="fs-24 pl-10">已提现金额</p>
            <p class="fw-500 fs-56">￥942.00</p>
          </div>
        </div>

        <stateFilter
          :dateSelect="dateSelect"
          :filterList="filterList"
          @openDateSelect="openDateSelect"
          @onConfirm="onConfirm"
          @close="onClose"
          @getData="getData"
        ></stateFilter>
        <!-- 标签栏 -->
        <div class="color-gray-light">共4条记录</div>
        <record-list :list="recordList" imgSize="60" type="withdraw" @openDetail="openDetail"></record-list>
        <!-- 收银记录列表 -->
      </div>
    </div>
  </div>
</template>

<script>
import recordList from 'components/recordList'
import stateFilter from 'components/stateFilter'
export default {
  components: {
    recordList,
    stateFilter
  },
  data() {
    return {
      // 标签栏
      dateSelect: false,
      filterList: ['全部', '待审核', '已通过', '已驳回'],
      //提现记录列表
      recordList: [
        {
          url: '',
          iconId: 'wechat',
          RealName: '张三',
          time: '2020-03-19  16:33:59',
          PriceSum: 3.44,
          state: 0
        },
        {
          url: '',
          iconId: 'wechat',
          RealName: '张三',
          time: '2020-03-19  16:33:59',
          PriceSum: 3.44,
          state: 1
        },
        {
          url: '',
          iconId: 'wechat',
          RealName: '张三',
          time: '2020-03-19  16:33:59',
          PriceSum: 3.44,
          state: 2
        },
        {
          url: '',
          iconId: 'wechat',
          RealName: '张三',
          time: '2020-03-19  16:33:59',
          PriceSum: 3.44,
          state: 3
        }
      ]
    }
  },
  computed: {
    // 计算属性的 getter
    kkamount: function() {
      // `this` 指向 vm 实例
      return utils.changePrice2money(this.price)
    }
  },
  methods: {
    search(ad) {
      console.log(ad)
    },
    onSubmit(values) {
      console.log('submit', values)
    },
    onChange(index) {
      console.log(index)
    },
    openDateSelect() {
      this.dateSelect = true
    },
    onConfirm(value) {
      // this.value = value
      this.dateSelect = false
    },
    onClose() {
      this.dateSelect = false
    },
    getData() {},
    openDetail(val) {
      this.$router.push('/withdraw/detail')
    }
  }
}
</script>
<style lang="scss" scoped>
.head-bg-box {
  height: 214px;
}
.total-box {
  min-height: 200px;
}
</style>
